/**
 * Beijing Jiaotong University
 * Copyright (c) 1896-2016 All Rights Reserved.
 */
package org.myws.busi.impl;

import javax.annotation.Resource;
import javax.jws.WebMethod;
import javax.jws.WebService;

import org.myws.dao.mybatis.domain.Department;
import org.myws.facade.DepartmentFacade;
import org.myws.service.DepartmentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSON;

/**
 * 
 * @author HuHui
 * @version $Id: DepartmentFacadeImpl.java, v 0.1 2016年5月8日 下午3:51:47 HuHui Exp $
 */
@Component
@WebService(endpointInterface = "org.myws.facade.DepartmentFacade")
public class DepartmentFacadeImpl implements DepartmentFacade {

    private static final Logger log = LoggerFactory.getLogger(DepartmentFacadeImpl.class);

    @Resource
    private DepartmentService   departmentService;

    @Override
    @WebMethod
    public Department getById(Long id) {
        log.info("收到查询Department请求,参数id={}", id);
        Department dept = departmentService.getById(id);
        log.info("Department查询结果:{}", JSON.toJSONString(dept));
        return dept;
    }

}
